package ar.edu.unq.tpi.uis.tepe3.wicket.components;

import ar.edu.unq.tpi.uis.tepe3.dominio.Group;
import ar.edu.unq.tpi.uis.tepe3.dominio.User;
import ar.edu.unq.tpi.uis.tepe3.wicket.pages.GroupPage;

@SuppressWarnings("serial")
public class GroupToUserForm extends AbstractUserToGroupForm<Group, User> {

	public GroupToUserForm(String id, Group object) {
		super(id, object);
	}

	@Override
	protected Class<User> getSelectableClass() {
		return User.class;
	}

	@Override
	protected void redirectToListPage() {
		this.setResponsePage(GroupPage.class);
	}
	
	@Override
	protected void asignar(User selected) {
		this.getObject().addUser(selected);
	}
}
